toolbar: Remove max-child-expand child property
authorTimm Bäder <mail@baedert.org>
Sat, 15 Oct 2016 19:34:32 +0000 (21:34 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 17 Oct 2016 22:29:20 +0000 (00:29 +0200)
gtk/gtktoolbar.c

index 1e7c5506e9251e8a6d964c83dbef00a1d98789bd..28a464694ea4ab62b93bfac595c63cc0b4d11a9b 100644 (file)
@@ -276,8 +276,6 @@ static gboolean   gtk_toolbar_render               (GtkCssGadget *gadget,
                                                     int           height,
                                                     gpointer      data);
 
-static gint                 get_max_child_expand (GtkToolbar *toolbar);
-
 /* methods on ToolbarContent 'class' */
 static ToolbarContent *toolbar_content_new_tool_item        (GtkToolbar          *toolbar,
                                                             GtkToolItem         *item,
@@ -589,15 +587,6 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
                                                                    FALSE,
                                                                    GTK_PARAM_READWRITE));
 
-  gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("max-child-expand",
-                                                             P_("Maximum child expand"),
-                                                             P_("Maximum amount of space an expandable item will be given"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             G_MAXINT,
-                                                             GTK_PARAM_READABLE));
-
   binding_set = gtk_binding_set_by_class (klass);
   
   add_arrow_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT);
@@ -1562,7 +1551,6 @@ gtk_toolbar_allocate (GtkCssGadget        *gadget,
    */
   if (!overflowing)
     {
-      gint max_child_expand;
       n_expand_items = 0;
 
       for (i = 0, list = priv->content; list != NULL; list = list->next, ++i)
@@ -1573,7 +1561,6 @@ gtk_toolbar_allocate (GtkCssGadget        *gadget,
             n_expand_items++;
         }
 
-      max_child_expand = get_max_child_expand (toolbar);
       for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
         {
           ToolbarContent *content = list->data;
@@ -1584,9 +1571,6 @@ gtk_toolbar_allocate (GtkCssGadget        *gadget,
               if (size % n_expand_items != 0)
                 extra++;
 
-              if (extra > max_child_expand)
-                extra = max_child_expand;
-
               allocations[i].width += extra;
               size -= extra;
               n_expand_items--;
@@ -3423,17 +3407,6 @@ toolbar_content_show_all (ToolbarContent  *content)
     gtk_widget_show_all (widget);
 }
 
-static gint
-get_max_child_expand (GtkToolbar *toolbar)
-{
-  gint mexpand = G_MAXINT;
-
-  gtk_widget_style_get (GTK_WIDGET (toolbar),
-                        "max-child-expand", &mexpand,
-                        NULL);
-  return mexpand;
-}
-
 /* GTK+ internal methods */
 gchar *
 _gtk_toolbar_elide_underscores (const gchar *original)